Skip to content

Feature/modernize sdk#4

Merged
victorycodedev merged 7 commits into
mainfrom
feature/modernize-sdk
Jun 12, 2026
Merged

Feature/modernize sdk#4
victorycodedev merged 7 commits into
mainfrom
feature/modernize-sdk

Conversation

@victorycodedev

Copy link
Copy Markdown
Owner

Summary

Modernizes the SDK around a single MetaApiClient entry point and replaces the older v1-style API usage with focused resource classes.

Changes

  • Added MetaApiClient as the main SDK entry point
  • Added resource-based Account Management APIs
  • Added Provisioning Profile support
  • Added Account Replica support
  • Refactored CopyFactory into resource classes
  • Added expanded CopyFactory endpoint coverage
  • Added optimized CopyFactory copy trading helper
  • Refactored MetaStats into resource classes
  • Added MetaApi REST terminal API support
  • Added regional service support, e.g. copyFactory(region: 'london') and terminal(region: 'london')
  • Replaced old exception handling with a single MetaApiException
  • Removed old v1 AccountApi usage
  • Updated README documentation for the new SDK pattern
  • Added note that real-time streaming/WebSocket support is planned for a future version
  • Migrated/expanded tests with Pest

Validation

  • composer test
  • composer validate --strict
  • php -l across all PHP files
  • git diff --check

Notes

This release focuses on the stable REST-based SDK surface. Risk Management, MT Manager, and real-time streaming/WebSocket support are planned for future versions.

…nce error handling with MetaApiException, and implement new AccountManagement resources

- Converted Configuration and CopyTrade from traits to classes for better structure and encapsulation.
- Introduced MetaApiException for structured error handling across API calls.
- Added AccountReplica and ProvisioningProfile resources for managing account replicas and provisioning profiles.
- Updated HTTP request methods to return nullable types for improved type safety.
- Removed deprecated test files and added new tests for AccountApi and ProvisioningProfile.
- Implemented mock HTTP client for testing API interactions.
feat: refactor MetaStats to use Metrics class and add new metric methods

feat: implement new portfolio strategy endpoints in Configuration class

feat: add CopyTrade class enhancements for configuring copy trading

feat: introduce History, Logs, Trading, and Webhooks resources for CopyFactory

refactor: convert Metrics trait to class and add historical trades and reset metrics methods

test: add tests for new portfolio strategy, webhook, history, trading, and metrics endpoints
- Removed AccountApiTest and migrated tests to AccountManagementTest for better organization.
- Introduced TerminalApi with resources for managing trading state, market data, margin calculations, and trading operations.
- Added new resources: Credits, History, Margin, MarketData, State, and Trading to encapsulate terminal functionalities.
- Updated tests to cover new terminal functionalities including state retrieval, historical data access, market data queries, and margin calculations.
- Improved mock HTTP client setup for better test isolation and clarity.
@victorycodedev
victorycodedev merged commit e51769d into main Jun 12, 2026
12 checks passed
@victorycodedev
victorycodedev deleted the feature/modernize-sdk branch June 12, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant